#ifndef __IMAGE_INFO_H__
#define __IMAGE_INFO_H__


#include <QtWidgets/QtWidgets>


class ImageInfo
{
    Q_DISABLE_COPY(ImageInfo)

public:
    ImageInfo(const QString &path, const QString &name);
    virtual ~ImageInfo();

    qint64 cacheKey() const
    {
        if (mImage != 0)
            return mImage->cacheKey();
        return 0;
    }

    const QString &name() const
    {
        return mName;
    }

    const QString &path() const
    {
        return mPath;
    }

    const QSize &size() const
    {
        return mSize;
    }

    const QPoint &position() const
    {
        return mPos;
    }

    void setPosition(const QPoint &pos)
    {
        mPos = pos;
    }

    const QPixmap &image() const
    {
        return *mImage;
    }

protected:
    QPixmap     *mImage;
    QString     mName;
    QString     mPath;
    QPoint      mPos;
    QSize       mSize;
};


#endif  /*__IMAGE_INFO_H__*/
